package com.sunxd.rule.judge.beans.enums;

import lombok.Getter;

/**
 * @author sun.xd
 * @description: description
 * @date 2022/2/10 17:46
 */
@Getter
public enum OperatorTypeEnum {

    GT("大于"),
    GTE("大于等于"),
    LT("小于"),
    LTE("小于等于"),
    IN("包含"),
    EQ("等于"),
    GTE_LTE("在XX区间内"),

    INVOKE("SPI扩展使用"),
    ;


    public static OperatorTypeEnum match(String name) {
        for (OperatorTypeEnum value : OperatorTypeEnum.values()) {
            if (value.name().equals(name)) {
                return value;
            }
        }
        return null;
    }

    private String desc;

    OperatorTypeEnum(String desc) {
        this.desc = desc;
    }


}
